package node;

public class ThreeNode<T> {
    public String tag;
    public T data;
    public ThreeNode<T> left;
    public ThreeNode<T> right;
    public ThreeNode<T> parent;

    public ThreeNode(T data,String tag){
        setData(data);
        this.tag=tag;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public ThreeNode<T> getLeft() {
        return left;
    }

    public void setLeft(ThreeNode<T> left) {
        this.left = left;
    }

    public ThreeNode<T> getRight() {
        return right;
    }

    public void setRight(ThreeNode<T> right) {
        this.right = right;
    }

    public ThreeNode<T> getParent() {
        return parent;
    }

    public void setParent(ThreeNode<T> parent) {
        this.parent = parent;
    }
}